package com.tuo51.childcare.domain.vo;

import com.tuo51.childcare.domain.expertroom.ExpertRoom;
import com.tuo51.foudation.utils.CopyUtils;
import lombok.Data;

import java.util.Date;

@Data
public class ExpertRoomVO {

    private String id;

    private Date created = new Date();

    private String name;

    private String description;

    private String avatar;

    private String tags;

    public static ExpertRoomVO of(ExpertRoom room){
        ExpertRoomVO ret = new ExpertRoomVO();

        CopyUtils.copyProperties(room, ret);

        return ret;
    }

    public static ExpertRoomVO of(String name, String description, String avatar, String tags){
        ExpertRoomVO ret = new ExpertRoomVO();

        ret.setName(name);
        ret.setDescription(description);
        ret.setAvatar(avatar);
        ret.setTags(tags);

        return ret;
    }
}
